import request from '@/utils/request'

export function createProject(data) {
  return request({
    url: '/project/create',
    method: 'POST',
    data
  })
}

export function getProjects(params) {
  return request({
    url: '/projects',
    method: 'GET',
    params
  })
}

export function getProject(id) {
  return request({
    url: `/project/${id}`,
    method: 'GET'
  })
}

export function updateProject(data) {
  return request({
    url: `/project/update`,
    method: 'PUT',
    data
  })
}

export function deleteProject(id) {
  return request({
    url: `/project/${id}`,
    method: 'DELETE'
  })
}
